<?php 
session_start();
if (isset($_SESSION['username'])) {
	# code...

$id = $_GET['id'];
$data = file_get_contents('./Db/db.json');
$data = json_decode($data);
array_splice($data, $id,1);
$data = json_encode($data);
file_put_contents('./Db/db.json', $data);
header("Location:./index.php");
}else{
	header("Location:./index.php");
}




 ?>